template.footer = '<div id="footer" align="right"><a href="http://wunschkiste.appspot.com/sites/impressum" target="_blank">IMPRESSUM</a> | '+
'<a href="http://wunschkiste.appspot.com/sites/agb" target="_blank">AGB</a> | '+
'<a href="http://wunschkiste.appspot.com/sites/agb#datenschutz" target="_blank">DATENSCHUTZ</a></div>';

template.canvas = {};

template.canvas.maincontent = '<div id="loaderOverlay">' + 
'	<div id="ajaxLoader">' + 
'		<div></div>' + 
'	</div>' + 
'</div>' +
'   <div id="error-message" style="display:none;">'+
'	   <p></p>' +
'   </div>' +
'<div id="tabs">'+
'	<ul class="menu">'+
'		<li><a href="#tab-start">' + utils.getText("tab.start") + '</a></li>'+
'		<li><a href="#tab-own">' + utils.getText('tab.my') +'</a></li>'+
'		<li><a href="#tab-friends">' + utils.getText('tab.friends') +'</a></li>'+
'		<li><a href="#tab-reserve">' + utils.getText('tab.reservations') +'</a></li>'+
//'		<li><a href="#tab-info">Info</a></li>'+
'	</ul>'+
'   <div align="center"><div id="sys-message" class="hidden sys-message"></div></div>'+
'   <div id="content">'+
'	<div id="tab-start">'+
'	<div id="section-tagcloud"></div>'+
'	<div id="section-selection"></div>'+
'	</div>'+
'	<div id="tab-own">'+
'		<div id="wish_add"></div>'+
'		<div id="wish_edit"></div>'+
'       <div id="wishlist"><h3><a href="javascript:;" class="link-show-add red">' + utils.getText('canvas.my.do_wish') +'</a></h3>'+
'		<div id="wishlist-own"></div></div>'+
'		<div id="wish-show"></div>'+
'	</div>'+
'	<div id="tab-friends">'+
'<h3>' + utils.getText('canvas.friends.header') + ' <sup><a href="javascript:;" class="link-invite red">' + utils.getText('canvas.friends.link_invite') + '</a></sup></h3>'+
'		<div id="friends-list"></div><br clear="all" />'+
'		<div id="wishlist-friend"></div>'+
'	</div>'+
'	<div id="tab-reserve">'+
'		<h3>' + utils.getText('canvas.reservs.header') + '</h3>'+
'		<div id="reserves-list"></div>'+
'	</div>'+
//'	<div id="tab-info">'+
//'		<h3>Infos über App</h3>'+
//'		<div id="info-content"></div>'+
//'	</div>'+
'	</div><div id="wish-view" class="ui-tabs-panel"></div>' + template.footer;

template.canvas.wish_add = '<div id="form-add" class="hidden">'+
'<h3>' + utils.getText('canvas.my.add_header') + '</h3>'+
'<div><label for="form-add-title">Wie heisst dein Wunsch:<b>*</b></label></div>'+
'<div><input class="field-wish-add" type="text" name="title" value="{{title}}" id="form-add-title" title="Name des Wunsches" size="60" style="font-size: 15px; font-weight: bold;" /></div>'+
'<div style="float:left; margin-right: 10px;"><div><label for="form-add-category">Kategorie:<b>*</b></label></div>'+
'<div><select class="field-wish-add" name="category_id" id="form-add-category">'+
'<option value="">Bitte auswählen</option>'+
'{{#categories}}<option value="{{id}}">{{name}}</option>{{/categories}}'+
'</select></div></div>'+
'<div><div><label for="form-add-reason">Anlaß:</label></div>'+
'<div><select class="field-wish-add" name="reason_id" id="form-add-reason">'+
'{{#reasons}}<option value="{{id}}">{{name}}</option>{{/reasons}}'+
'</select></div></div>'+
'<div><label for="form-add-description">Beschreibung (optional):</label></div>'+
'<div><textarea class="field-wish-add" name="description" value="" id="form-add-description" cols="50" rows="3"></textarea></div>'+
'<div><label for="form-add-tags">Stichwörter / Tags (Mit Komma getrennt!):</label></div>'+
'<div><input type="text" class="field-wish-add" name="tags" value="{{tags_list}}" id="form-add-tags" size="45" /></div>'+
'<div><label for="form-add-link">Link (Zur Infoseite / Produktseite):</label></div>'+
'<div><input class="field-wish-add" type="text" name="link" value="{{link}}" id="form-add-link" size="45" /></div>'+
'<div><label for="form-add-price-from">Ungefährer Preis:</label></div>'+
'<div><input class="field-wish-add" type="text" name="price_from" value="{{price_from}}" id="form-add-price-from" size="3" /> bis: <input type="text" class="field-wish-add" name="price_to" value="{{price_to}}" size="3"/> €</div>'+
'<br /><div>[<a href="javascript:;" id="img-add-show"><b>Bild hinzufügen</a>]</b></div>'+
'<div id="img-add-panel" class="hidden">'+
'<div><img src="{{img_url}}" class="preview" id="img-add-thumb" /></div>'+
'<div><br /></div>'+
'<div>Suchbegriff:<br /><input type="text" id="img-add-query" size="20" /><button id="img-add-search">Bild suchen</button></div>'+
'<div><label for="form-edit-img">Bild URL:</label></div>'+
'<div><input class="field-wish-add" type="text" name="img_url" id="img-add-url" value="" size="45" /></div>'+
'<div id="img-add-result"></div>'+
'</div>'+
'<br /><div><button id="form-add-submit">' + utils.getText('canvas.button.add_wish') + '</button><button id="form-add-cancel">Vergiss es!</button></div>'+
'</div>';

template.canvas.wish_edit = '<div id="form-edit" class="hidden">'+
'<h3>Hier kannst Du Deinen Wunsch Anpassen</h3>'+
'<div><label for="form-edit-title">Wie heisst dein Wunsch:</label></div>'+
'<div><input class="field-wish-edit" type="text" name="title" value="{{title}}" id="form-edit-title" title="Name des Wunsches" size="45" /></div>'+
'<div><label for="form-edit-category">Kategorie:<b>*</b></label></div>'+
'<div><select class="field-wish-edit" name="category_id" id="form-edit-category">'+
'{{#categories}}<option value="{{id}}">{{name}}</option>{{/categories}}'+
'</select></div>'+
'<div><label for="form-edit-reason">Anlaß:</label></div>'+
'<div><select class="field-wish-edit" name="reason_id" id="form-edit-reason">'+
'{{#reasons}}<option value="{{id}}">{{name}}</option>{{/reasons}}'+
'</select></div>'+
'<div><label for="form-edit-description">Beschreibung (optional):</label></div>'+
'<div><textarea class="field-wish-edit" name="description" value="" id="form-edit-description" cols="55" rows="3">{{description}}</textarea></div>'+
'<div><label for="form-edit-link">Link zum Beispielprodukt:</label></div>'+
'<div><input class="field-wish-edit" type="text" name="link" value="{{link}}" id="form-edit-link" size="45" /></div>'+
'<div><label for="form-edit-price-from">Ungefährer Preis:</label></div>'+
'<div><input class="field-wish-edit" type="text" name="price_from" value="{{price_from}}" id="form-edit-price-from" size="3" />'+
'bis: <input type="text" class="field-wish-edit" name="price_to" value="{{price_to}}" size="3" id="form-edit-price-to" /></div>'+
'<div><label for="form-edit-tags">Tags:</label></div>'+
'<div><input type="text" class="field-wish-edit" name="tags" value="{{tags_list}}" id="form-add-tags" size="45" /></div>'+
'<div>Bild:<br /><img src="{{img_url}}" class="preview" id="img-edit-thumb" /><br />[<a href="javascript:;" id="img-edit-show">Bild ändern</a>]</div>'+
'<div id="img-edit-panel" class="hidden">'+
'<div><input type="text" id="img-edit-query" size="20" /><button id="img-edit-search">suchen</button></div>'+
'<div><label for="form-edit-img">Image URL:</label></div>'+
'<div><input class="field-wish-edit" type="text" name="img_url" id="img-edit-url" value="" size="45" /></div>'+
'<div id="img-edit-result"></div>'+
'</div>'+
'<div><input class="field-wish-edit" type="hidden" name="wish_id" value="{{wish_id}}" /></div>'+
'<p><div><div style="float:right;"><button id="form-edit-remove">Wunsch löschen</button></div>'+
'<button id="form-edit-submit">Ändern</button><button id="form-edit-cancel">Vergiss es!</button></div>'+
'</div></p>';

template.canvas.wish_list_own = '<h4>Deine aktuelle Wünsche: {{total}}</h4>'+
'{{#items}}<div class="item_row">'+
'<div class="item_img_cell"><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show"><img class="item" src="{{img_url}}" border="0" alt="thumb" /></a></div>'+
'<div id="item_dsc"><b><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show wish-title">{{title}}</a></b><br />'+
'<a href="javascript:;" rel="{{wish_id}}" class="link-wish-edit">bearbeiten</a>'+
'{{#reserved}}<div>jemand möchte dir das schenken</div>{{/reserved}}'+
'<div>Anlaß: {{reason}}</div><div><a href="' + config.backend_url + 'wish/find?wish_id={{wish_id}}" target="_blank">Suchen</a>'+
'{{#link}} | <a href="{{link}}" target="_blank">Beispiel anschauen</a>{{/link}}</div>'+
'</div></div>{{/items}}'+
'{{^items}}<h4>Nichts drin? <a href="javascript:;" class="link-show-add red ">Lege was rein!</a></h4><div align="center"><a href="javascript:;" class="link-show-add"><img src="' + config.images_path + 'box_empty.png" border="0" /></a></div>{{/items}}'+
'{{#pages}}<p>{{#show_prev}}[<a href="javascript:;" id="link-pager-prev">zurück</a>] '+
'{{/show_prev}} Seite {{page}} von {{pages}} '+
'{{#show_next}}[<a href="javascript:;" id="link-pager-next">weiter</a>]{{/show_next}}'+
'</p>{{/pages}}';
//'<div><h5>Link zu deiner Wunschliste: <a href="' + config.backend_url + 'wish/list?uid={{uid}}" target="_blank">' + config.backend_url + 'wish/list?uid={{uid}}</a></h5></div>';

template.canvas.wish_list_friend = '<h4>Aktuelle Wünsche von {{owner_name}}: {{total}}</h4>'+
'{{#items}}<div class="item_row">'+
'<div class="item_img_cell"><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show"><img class="item" src="{{img_url}}" border="0" alt="thumb" /></a></div>'+
'<div id="item_dsc"><b><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show wish-title">{{title}}</a></b><br />'+
'{{^satisfied}}'+
'{{^reserved}}<a href="javascript:;" rel="{{wish_id}}" class="link-wish-reserve">reservieren</a>{{/reserved}}'+
'{{#reserved}}bereits reserviert{{/reserved}}'+
'{{/satisfied}}{{#satisfied}}bereits erfüllt{{/satisfied}}'+
'<div>{{tags_list}}</div>'+
'<div>Anlaß: {{reason}} | <a href="' + config.backend_url + 'wish/find?wish_id={{wish_id}}" target="_blank">Suchen</a></div>'+
'<div>{{#link}}<a href="{{link}}" target="_blank">Beispiel Produktseite</a>{{/link}}</div>'+
'</div></div>{{/items}}'+
'{{#pages}}<p>{{#show_prev}}[<a href="javascript:;" id="friend-pager-prev">zurück</a>] '+
'{{/show_prev}} Seite {{page}} von {{pages}} '+
'{{#show_next}}[<a href="javascript:;" id="friend-pager-next">weiter</a>]{{/show_next}}'+
'</p>{{/pages}}';

template.canvas.wish_list_user = '<h4>Aktuelle Wünsche von {{owner_name}}: {{total}}</h4>'+
'{{#items}}<div class="item_row">'+
'<div class="item_img_cell"><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show"><img class="item" src="{{img_url}}" border="0" alt="thumb" /></a></div>'+
'<div id="item_dsc"><b><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show wish-title">{{title}}</a></b><br />'+
'{{#satisfied}}bereits erfüllt{{/satisfied}}'+
'<div>{{tags_list}}</div>'+
'<div>Anlaß: {{reason}} | <a href="' + config.backend_url + 'wish/find?wish_id={{wish_id}}" target="_blank">Suchen</a></div>'+
'<div>{{#link}}<a href="{{link}}" target="_blank">Beispiel Produktseite</a>{{/link}}</div>'+
'</div></div>{{/items}}'+
'{{#pages}}<p>{{#show_prev}}[<a href="javascript:;" id="user-pager-prev">zurück</a>] '+
'{{/show_prev}} Seite {{page}} von {{pages}} '+
'{{#show_next}}[<a href="javascript:;" id="user-pager-next">weiter</a>]{{/show_next}}'+
'</p>{{/pages}}'+
'<div><button class="button-show-back">zurück</button></div>';

template.canvas.reserves_list = '<h4>Anzahl deiner Reservierungen: {{total}}</h4>'+
'{{#items}}<div class="item_row">'+
'<div class="item_img_cell"><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show"><img class="item" src="{{img_url}}" border="0" alt="thumb" /></a></div>'+
'<div id="item_dsc"><b><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show wish-title">{{title}}</a></b><br />'+
'<div>Wünscht sich {{owner_name}}</div>'+
'<div>Anlaß: {{reason}}</div>'+
'<a href="javascript:;" rel="{{wish_id}}" class="link-reserve-remove">doch nicht reservieren</a>'+
'</div></div>{{/items}}'+
'{{^items}}<div align="center"><img src="' + config.images_path + 'box_empty.png" border="0" /></div>{{/items}}'+
'{{#pages}}<p>{{#show_prev}}[<a href="javascript:;" id="reserve-pager-prev">zurück</a>] '+
'{{/show_prev}} Seite {{page}} von {{pages}} '+
'{{#show_next}}[<a href="javascript:;" id="reserve-pager-next">weiter</a>]{{/show_next}}'+
'</p>{{/pages}}';

template.canvas.wish_show = '<div id="view-wish-show">'+
'<h3>Ein Wunsch von <a href="javascript:;" rel="{{owner_id}}" class="link-show-userslist">{{owner_name}}</a></h3>'+
'<div style="float: right;"><b>Aktionen:</b> </br><a href="javascript:;" rel="{{wish_id}}" class="red link-wish-copy">Will ich auch</a>'+
' | <a href="javascript:;" rel="{{wish_id}}" class="red link-wish-like">Finde ich gut</a> ({{likes}})'+
' | <a href="javascript:;" rel="{{owner_id}}" class="red link-show-userslist">Alle Wünsche</a></div></div>'+
'<div><img src="{{img_url}}" /></div>'+
'<h3>{{title}}</h3>'+
'<table id="div-wish-description">'+
'<tr><td>Anlaß:</td><td>{{reason}}</td></tr>'+
'<tr><td>Preis:</td><td>{{price_from}} bis {{price_to}} €</td></tr>'+
'<tr><td>Link:</td><td><a href="{{link}}" target="_blank">{{link}}</a></td></tr>'+
'<tr><td>Beschreibung:</td><td>{{description}}</td></tr>'+
'<tr><td>Tags:</td><td>{{tags_list}}</td></tr>'+
'<tr><td>Suchen bei:</td><td><a href="' + config.backend_url + 'wish/find?wish_id={{wish_id}}&t=a" target="_blank">Amazon</a></td></tr>'+
'<tr><td></td><td><a href="' + config.backend_url + 'wish/find?wish_id={{wish_id}}&t=e" target="_blank">Ebay</a></td></tr>'+
'<tr><td></td><td><a href="' + config.backend_url + 'wish/find?wish_id={{wish_id}}&t=g" target="_blank">Google</a></td></tr>'+
'</table>'+
'<div><h4>Finden diesen Wunsch gut: {{likes}}</h4><div id="div-likers-list"></div></div>'+
'<div><button class="button-show-back">zurück</button></div>'+
'</div>';

template.canvas.likers_list = '<a class="prev left"></a><a class="next right"></a>'+
'<div class="carousel"><ul>{{#users}}'+
'<li><a href="javascript:;" rel="{{id}}" class="link-show-userslist"><img src="{{photo}}" style="width:50px; height:50px;" title="{{name}}" border="0" alt="pic" /></a></li>'+
'{{/users}}</ul></div>';

template.canvas.images_list = '<div>Wähle Bild aus:</div><div class="hidden search-list">'+
'{{#images}}<a href="javascript:;" class="img-search-item" rel="{{url}}">'+
'<img src="{{tbUrl}}" class="thumb" border="1" id="{{imageId}}" title="{{originalContextUrl}} {{width}} : {{height}}" alt="thumb" />'+
'</a> {{/images}}<div><a href="javascript:;" class="img-search-prev">prev</a> | <a href="javascript:;" class="img-search-next">next</a></div></div>'+
'<div id="google_branding"></div>';

template.canvas.friends_list = '<a class="prev left"></a><a class="next right"></a>'+
'<div class="carousel"><ul>'+
'{{#friends}}<li><a class="friends-list-item" rel="{{id}}" href="javascript:;"><img class="thumb" src="{{photo}}" alt="{{name}}" title="{{name}}" /></a></li>{{/friends}}'+
'</ul></div>'+
'{{^friends}}<h4>Noch keine Freunde hier? <a href="javascript:;" class="link-invite red">Lade alle Deine Freunde jetzt ein!</a></h4>'+
'<div align="center"><img src="' + config.images_path + 'box_empty.png" border="0" /></div>{{/friends}}';

template.canvas.tag_cloud = '<div div="tag-cloud"><a href="javascript:;" class="lnk-to-add red">ZU DEINER WUNSCHLISTE</a><h3>Die populärtsen Tags</h3>'+
'{{#items}}<a href="javascript:;" rel="{{name}}" class="tag-cloud" style="font-size:{{size}}em; font-weight:{{width}};" title="{{count}}">{{name}}</a> {{/items}}'+
'</div>'

template.canvas.selection_list = '<h4>{{title}}</h4>'+
'<div style="float: right;"><b>zeigen: <a href="javascript:;" class="red" id="link-show-newest">neueste</a> | <a href="javascript:;" class="red" id="link-show-ranked">beliebteste</a></b></div><br clear="all" />'+
'{{#items}}<div class="item_row">'+
'<div class="item_img_cell"><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show"><img class="item" src="{{img_url}}" border="0" alt="thumb" /></a></div>'+
'<div id="item_dsc"><div><a href="javascript:;" rel="{{wish_id}}" class="link-wish-show wish-title">{{title}}</a></div>'+
'{{#tags_list}}<div><i>{{tags_list}}</i></div>{{/tags_list}}'+
'<div>Anlaß: {{reason}} | Kategorie: {{category}} <a href="' + config.backend_url + 'wish/find?wish_id={{wish_id}}" target="_blank">Suchen</a>'+
'{{#link}} | <a href="{{link}}" target="_blank">Link</a>{{/link}}</div>'+
'<div>Aktionen: <a href="javascript:;" rel="{{owner_id}}" class="red link-show-userslist">Alle Wünsche</a>'+
' | <a href="javascript:;" rel="{{wish_id}}" class="red link-wish-copy">Will ich auch</a>'+
' | <a href="javascript:;" rel="{{wish_id}}" class="red link-wish-like">Finde ich gut</a> ({{likes}})</div></div>'+
'</div></div>{{/items}}'+
'{{^items}}<b>Leider nichts gefunden.</b>{{/items}}'+
'{{#pages}}<p>{{#show_prev}}[<a href="javascript:;" id="selection-pager-prev">zurück</a>] '+
'{{/show_prev}} Seite {{page}} von {{pages}} '+
'{{#show_next}}[<a href="javascript:;" id="selection-pager-next">weiter</a>]{{/show_next}}'+
'</p>{{/pages}}';



